<template>
	<view>
		
		<view class="center-view">
			<image src="../../static/settle/zmicon1.png" class="add-we"></image>
			<view class="from-view">
				<view class="from-input" style="margin-top: 0px;">
					<view class="input-title">姓名</view>
					<input class="input-text" type="text" placeholder="请输入姓名" v-model="form.username"/>
				</view>
				
				<view class="from-input">
					<view class="input-title">手机号</view>
					<input class="input-text" type="text" placeholder="请输入手机号" v-model="form.mobile"/>
				</view>

				<view class="from-input">
					<view class="input-title">开通城市</view>
					<input class="input-text" type="text" placeholder="请输入开通城市" v-model="form.city_name"/>
				</view>
			</view>
			
		</view>

		<view class="subbtn flex flex-center" @click="submit()">提交</view>
		<view style="width:100%;height: 20rpx;"></view>
	
	</view>
</template>

<script>
	export default {
			data() {
				return {
					
				  form: {
					username: '',
					city_name: '',
					mobile: ''
				  }
		 
	
				}
			},
      onShow(){
    
      },
      methods: {
        gender(e){
          this.form.gender = e
        },
        submit() {
          let that = this
          if (!this.form.username) {
            uni.showToast({
              title: '请输入姓名',
              icon: 'none'
            });
            return;
          }
          if (!this.form.mobile) {
            uni.showToast({
              title: '请输入手机号',
              icon: 'none'
            });

            return;
          }
          if (!this.form.city_name) {
            uni.showToast({
              title: '请填写入驻的城市',
              icon: 'none'
            });

            return;
          }
          
          this.$http('technician.addchengshi', this.form).then(res => {
				uni.showToast({
				  title: res.msg,
				  icon: 'none'
				});
				if(res.code == 1){
					setTimeout(function(){
						uni.navigateBack({
							data: 1
						})
					},1500)
				}
			
          });
        },
        
      }
		}
</script>

<style>
	page {
		background: #25c173;
	}

	.top-view {
		width: 100%;
		height: 448rpx;
	}

	.center-view {
		padding: 0px 16px;
		margin-top: -55px;
		position: relative;
		z-index: 10;
		overflow: hidden;
	}

	.add-we {
		width: 100%;
		height: 76rpx;
	}

	.from-view {
		border-left: 2px solid rgb(85, 85, 85);
		border-right: 2px solid rgb(85, 85, 85);
		padding: 20px 16px;
		margin: 60px 0px 30px 0px;
		background-color: white;
		color: #666;
		padding-top: 18px;
		border-radius: 15px;
	}

	.from-input {
		white-space: nowrap;
		margin-top: 15px;
		border-radius: 10px;
		border: 2px solid rgb(36, 195, 115);
		height: 40px;
		padding: 0px 16px;
		display: flex;
		justify-content: space-between;
		align-content: center;
		align-items: center;
	}

	.input-title {
		font-size: 14px;
		color: rgb(138, 138, 138);
	}

	.input-text {
		font-size: 16px;
		color: rgb(51, 51, 51);
		font-weight: 600;
		text-align: right;
	}

	.zmicon {
		height: 29px;
		width: 99.8%;
		margin-left: 0.1%;
	}

	.btn-view {
		border-left: 2px solid rgb(85, 85, 85);
		border-right: 2px solid rgb(85, 85, 85);
		border-bottom: 2px solid rgb(85, 85, 85);
		padding: 0px 16px 16px;
		margin: -7px 1px 0px 0px;
		border-radius: 0px 0px 15px 15px;
		display: flex;
		justify-content: space-between;
		background-color: white;
		color: #666;
	}

	.flex-column {
		display: flex;
		flex-direction: column;
		-webkit-flex-direction: column;
	}

	.subbtn {
		margin: 25px auto 40px;
		width: 311px;
		height: 48px;
		line-height: 48px;
		background: #fff474;
		border: 3px solid #000;
		box-shadow: 0 6px 0 #000;
		opacity: 1;
		border-radius: 50px;
		font-size: 18px;
		font-weight: 600;
		color: #000;
		display: flex;
		justify-content: center;
	}
</style>
